/**
 * 定义天报表模块
 */
(function(window, angular, undefined){
	var module = angular.module('water.apps.nanshan.reportData.dayDataManager', ['water.apps.common.report.reportFormBase',
	                                                                          'water.common.dateUtil']);
	
	module.controller('reportDataDayManagerController',function($scope,$monitorDataService,$controller,$dateUtil){

		var control = $controller("commonReportFormController",{$scope:$scope});
		
		$scope.dataAPIName = 'getDayReport';
		$scope.dataExportAPIName = "exportDayExcel";
		$scope.stadardData={};
		var TwoTypeWaterStardard = {"065":'0.2~0.5',"060":'0.15~0.5',"ss_zhuodu":'',"101":'0.02~0.1',"111":'',"001":'6~9',"cond":'',"do":'6~7.5',"phtem":''};
		var threeTypeWaterStardard = {"065":'0.5~1',"060":'0.5~1',"ss_zhuodu":'',"101":'0.1~0.2',"111":'',"001":'6~9',"cond":'',"do":'5~6',"phtem":''};
		var fourTypeWaterStardard = {"065":'1~1.5',"060":'1~1.5',"ss_zhuodu":'',"101":'0.2~0.3',"111":'',"001":'6~9',"cond":'',"do":'3~5',"phtem":''};
		$scope.stadardData.TwoTypeWaterStardard = TwoTypeWaterStardard;
		$scope.stadardData.threeTypeWaterStardard = threeTypeWaterStardard;
		$scope.stadardData.fourTypeWaterStardard = fourTypeWaterStardard;
		
		/**
		 * 站点选择后，报表查询前执行的逻辑
		 * 用于准备查询前的参数
		 */
		$scope.onStationSelectedBeforeQuery = function(station){
			$scope.selectedModel = station;
			var parmList = $scope.selectedModel.parmToCheckList;
			$scope.parmList = $scope.selectedModel.parmToCheckList;
		}
		
		function _init(){
			$scope.startDate = $dateUtil.formatDate(new Date(),'yyyy-MM-dd');
		}

		_init();
	});
}(window, angular));